<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!--用户管理模块-->
<div role="tabpanel" class="tab-pane" id="user">
	<div class="check-div form-inline">
		
	
		<div class="col-xs-11">
		<form action="gotoLikeselecttoindex" method="post">
		<c:if test="${shenfen==6}">
		<span style="position:fixed; left:13%;">校区</span>
		<select class="form-control input-sm campusidrrrr " name="camqweasdpus"  style="position:fixed;left:15%;top:20px;">

		<option value=0  >全部</option>

			<c:forEach var="valuew" items="${mycampuslist}">
					<c:if test="${fourtouseryygg!=null}">
						<c:if test="${fourtouseryygg==valuew.id}">
							<option value=${valuew.id} selected="selected" >${valuew.campusname}</option>
						</c:if>
						<c:if test="${fourtouseryygg!=valuew.id}">
							<option value=${valuew.id} >${valuew.campusname}</option>
						</c:if>
					</c:if>
						<c:if test="${fourtouseryygg==null}">
						<option value=${valuew.id} >${valuew.campusname}</option>
						</c:if>
					
						</c:forEach>
		</select>

		<span style="position:fixed; left:23%;">部门</span><select class="form-control input-sm col-xs-4 ssssssssss" id="ucantut10" name="dsa"  style="position:fixed; top:20px;left:35%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="valuess" items="${role}">
						<c:if test="${twotouser!=null}">
						<c:if test="${twotouser==valuess.id}">
							<option value=${valuess.id}  selected="selected">${valuess.rolename}</option>
						</c:if>
						<c:if test="${twotouser!=valuess.id}">
							<option value=${valuess.id} >${valuess.rolename}</option>
						</c:if>
					</c:if>
						<c:if test="${twotouser==null}">
						<option value=${valuess.id}  >${valuess.rolename}</option>
						</c:if>
					
						
						
					
						</c:forEach>
					</select>
			<span  style="position:fixed; left:33%;">角色</span><select class="form-control input-sm  sweds" id="ucantut9" name="asd" style="position:fixed; top:20px;left:25%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="value" items="${d}">
					<c:if test="${threetouser!=null}">
						<c:if test="${threetouser==value.id}">
							<option value=${value.id}  selected="selected" >${value.departmentname}</option>
						</c:if>
						<c:if test="${threetouser!=value.id}">
							<option value=${value.id}  >${value.departmentname}</option>
						</c:if>
					</c:if>
						<c:if test="${threetouser==null}">
						<option value=${value.id}  >${value.departmentname}</option>
						</c:if>
					
						</c:forEach>
					</select>
		
		<c:if test="${onetouser!=null}">
			<input type="text" style="position:fixed; top:20px;left:43%;" class="form-control input-sm"  name="name"placeholder="输入名字搜索" value="${onetouser}">
		</c:if>
		<c:if test="${onetouser==null}">
			<input type="text" style="position:fixed; top:20px;left:43%;" class="form-control input-sm"  name="name"placeholder="输入名字搜索" value="">
		</c:if>
			<button class="btn btn-primary  btn-sm"  style="position:fixed; top:19px;left:55%;"  type="submit"  >查 询</button>
			
				</c:if>
			
				
				<c:if test="${shenfen!=6}">
	

		<span style="position:fixed; left:23%;">部门</span><select class="form-control input-sm col-xs-4" id="ucantut10" name="dsa"  style="position:fixed; top:20px;left:35%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="valuess" items="${role}">
						<c:if test="${twotouser!=null}">
						<c:if test="${twotouser==valuess.id}">
							<option value=${valuess.id}  selected="selected">${valuess.rolename}</option>
						</c:if>
						<c:if test="${twotouser!=valuess.id}">
							<option value=${valuess.id} >${valuess.rolename}</option>
						</c:if>
					</c:if>
						<c:if test="${twotouser==null}">
						<option value=${valuess.id}  >${valuess.rolename}</option>
						</c:if>
					
						
						
					
						</c:forEach>
					</select>

	<c:if test="${shenfen==3}">
	
	<span  style="position:fixed; left:33%;">角色</span><select  class="form-control input-sm  " id="ucantut9" name="asd" style="color:#696969; position:fixed; top:20px;left:25%;" disabled="disabled">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="value" items="${d}">
				
						<c:if test="${shenfenbumen==value.id}">
							<option value=${value.id}  selected="selected">${value.departmentname}</option>
						</c:if>
						
						</c:forEach>
					</select>
		
	
	</c:if>
	
	<c:if test="${shenfen!=3}">
<span  style="position:fixed; left:33%;">角色</span><select class="form-control input-sm  " id="ucantut9" name="asd" style="position:fixed; top:20px;left:25%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="value" items="${d}">
					<c:if test="${threetouser!=null}">
						<c:if test="${threetouser==value.id}">
							<option value=${value.id}  selected="selected" >${value.departmentname}</option>
						</c:if>
						<c:if test="${threetouser!=value.id}">
							<option value=${value.id}  >${value.departmentname}</option>
						</c:if>
					</c:if>
						<c:if test="${threetouser==null}">
						<option value=${value.id}  >${value.departmentname}</option>
						</c:if>
					
						</c:forEach>
					</select>
		</c:if>
		
		<c:if test="${onetouser!=null}">
			<input type="text" style="position:fixed; top:20px;left:43%;" class="form-control input-sm"  name="name"placeholder="输入名字搜索" value="${onetouser}">
		</c:if>
		<c:if test="${onetouser==null}">
			<input type="text" style="position:fixed; top:20px;left:43%;" class="form-control input-sm"  name="name"placeholder="输入名字搜索" value="">
		</c:if>
			<button class="btn btn-primary btn-sm fughyt"  style="position:fixed; top:19px;left:55%;"  type="submit"  >查 询</button>
			
				</c:if>
			</form>
		</div>
		
	</div>
<c:if test="${shenfen==6}">
	<div class="data-div">
		<div class="row tableHeader">
			<div class="col-xs-2 ">姓名</div>
			<div class="col-xs-1">电话</div>
			<div class="col-xs-2">校区</div>
			<div class="col-xs-1">性别</div>
			<div class="col-xs-1">角色</div>
			<div class="col-xs-2">部门</div>
			<div class="col-xs-1">状态</div>
			<div class="col-xs-2">操作</div>
		</div>
		<div class="tablebody" >

		


			<c:forEach var="user" items="${userList}">
				<div class="row  ${user.id}" id="GGGGGGG">
					<div class="col-xs-2 usernmae" >${user.name }</div>
					<div class="col-xs-1 phone"  >${user.phone }</div>
					<div class="col-xs-2">${user.campusname}</div>
					<div class="col-xs-1" >${user.sex }</div>
					<div class="col-xs-1  ${user.roleid}">
					<c:forEach var="value" items="${role}">
						<c:if test="${user.roleid==value.id}">
					${value.rolename}
					</c:if>
						</c:forEach>
					</div>
					<div class="col-xs-2    ${user.departmentid}" >${user.departmentname }</div>
					<div class="col-xs-1   ${user.status}"  id="">
				<c:choose>
    <c:when test="${user.status==0}">
       未激活
    </c:when>
    <c:when test="${user.status==1}">
       激活
    </c:when>
    <c:otherwise>
     禁用
    </c:otherwise>
</c:choose>
					</div>
					<div class="col-xs-2" id="go">
						<button class="btn btn-success btn-xs update-user " data-toggle="modal"
							data-target="#reviseUser"  >详情</button>
						<button class="btn btn-danger btn-xs  deluserhaha" data-toggle="modal"
							data-target="#deleteUser" 	>删除</button>
					</div>
				</div>



			</c:forEach>




		</div>

	</div>
	</c:if>
<c:if test="${shenfen!=6}">
<div class="data-div">
		<div class="row tableHeader">
			<div class="col-xs-2 ">姓名</div>
			<div class="col-xs-2">电话</div>
			<div class="col-xs-1">性别</div>
			<div class="col-xs-1">角色</div>
			<div class="col-xs-2">部门</div>
			<div class="col-xs-2">状态</div>
			<div class="col-xs-2">操作</div>
		</div>
		<div class="tablebody" >

		


			<c:forEach var="user" items="${userList}">
				<div class="row  ${user.id}" id="GGGGGGG">
					<div class="col-xs-2 usernmae" >${user.name }</div>
					<div class="col-xs-2 phone"  >${user.phone }</div>
					<div class="col-xs-1" >${user.sex }</div>
					<div class="col-xs-1  ${user.roleid}">
					<c:forEach var="value" items="${role}">
						<c:if test="${user.roleid==value.id}">
					${value.rolename}
					</c:if>
						</c:forEach>
					</div>
					<div class="col-xs-2    ${user.departmentid}" >${user.departmentname }</div>
					<div class="col-xs-2   ${user.status}"  id="">
				<c:choose>
    <c:when test="${user.status==0}">
       未激活
    </c:when>
    <c:when test="${user.status==1}">
       激活
    </c:when>
    <c:otherwise>
     禁用
    </c:otherwise>
</c:choose>
					</div>
					<div class="col-xs-2" id="go">
						<button class="btn btn-success btn-xs update-user " data-toggle="modal"
							data-target="#reviseUser"  >详情</button>
						<button class="btn btn-danger btn-xs  deluserhaha" data-toggle="modal"
							data-target="#deleteUser" 	>删除</button>
					</div>
				</div>



			</c:forEach>




		</div>

	</div>
</c:if>
	<!--页码块-->
	<footer class="footer">
		<ul class="pagination">
			<li><select  id="page" id="selectpages" >
			
		<c:forEach var="count"  items="${pageListGGGGG}"   >
	       <c:if test="${indexpagesinfogo!=nul}">
	       <c:if test="${indexpagesinfogo==count }">
	        <option value="${count}"  selected="selected">${count}</option>
	       </c:if>
	       <c:if test="${indexpagesinfogo!=count }">
	        <option value="${count}"  >${count}</option>
	       </c:if>
	       </c:if>
					<c:if test="${indexpagesinfogo==nul}">
					    <option value="${count}"  >${count}</option>
					</c:if>
	
	</c:forEach>
			
			</select> 页</li>
			<li class="gray">共${userzonggongpage}页</li>
			<li><i class="glyphicon glyphicon-menu-left" id="top"> </i>
			</li>
			<li><i class="glyphicon glyphicon-menu-right" id="bottom"> </i>
			</li>
		</ul>
	</footer>
<script type="text/javascript">
$(function(){
	$("#page").change(function(){
		var index=$(this).val();
		window.location.href="goFenYe_getUser?index="+index;
	});
	var cap=0;
	var page=0;
$("#top").click(function(){
if($("#page").val()!=1){
	cap=$("#page").val();
	
	page=parseInt(cap)-1;
	window.location.href="goFenYe_getUser?index="+page;
}else{
	cap=$("#page").val();
	page=cap;

}
});
$("#bottom").click(function(){
	if($("#page").val()=="${userzonggongpage}"){
		cap=$("#page").val();
		page=cap;
	
	}else{
		cap=$("#page").val();
		page=parseInt(cap)+1;
		window.location.href="goFenYe_getUser?index="+page;	
	}
	});
});

</script>
	<!--弹出添加用户窗口-->
	<div class="modal fade" id="addUser" role="dialog"
		aria-labelledby="gridSystemModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="gridSystemModalLabel">添加用户</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid">
						<form class="form-horizontal">
							<div class="form-group ">
								<label for="sName" class="col-xs-3 control-label">用户名：</label>
								<div class="col-xs-8 ">
									<input type="email" class="form-control input-sm duiqi"
										id="sName" placeholder="">
								</div>
							</div>
							<div class="form-group">
								<label for="sLink" class="col-xs-3 control-label">真实姓名：</label>
								<div class="col-xs-8 ">
									<input type="" class="form-control input-sm duiqi" id="sLink"
										placeholder="">
								</div>
							</div>
							<div class="form-group">
								<label for="sOrd" class="col-xs-3 control-label">电子邮箱：</label>
								<div class="col-xs-8">
									<input type="" class="form-control input-sm duiqi" id="sOrd"
										placeholder="">
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">电话：</label>
								<div class="col-xs-8">
									<input type="" class="form-control input-sm duiqi" id="sKnot"
										placeholder="">
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">地区：</label>
								<div class="col-xs-8">
									<select class=" form-control select-duiqi">
										<option value="">国际关系地区</option>
										<option value="">北京大学</option>
										<option value="">天津大学</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">权限：</label>
								<div class="col-xs-8">
									<select class=" form-control select-duiqi">
										<option value="">管理员</option>
										<option value="">普通用户</option>
										<option value="">游客</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label for="situation" class="col-xs-3 control-label">状态：</label>
								<div class="col-xs-8">
									<label class="control-label" for="anniu"> <input
										type="radio" name="situation" id="normal">正常</label>
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <label
										class="control-label" for="meun"> <input type="radio"
										name="situation" id="forbid"> 禁用</label>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="modal-footer">
				
					<input type="button" class="btn btn-xs btn-white" data-dismiss="modal" value="取 消">
					<input type="button" class="btn btn-xs btn-green"  value="保 存">
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->

	<!--弹出修改用户窗口-->
	
	<div class="modal fade" id="reviseUser" role="dialog"
		aria-labelledby="gridSystemModalLabel">
		<div class="modal-dialog" role="document">
			
			<div class="modal-content">
			
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="gridSystemModalLabel">修改用户</h4>
				</div>
			
				<div class="modal-body">
					<div class="container-fluid">
						<form class="form-horizontal  hahatoselect" >
							<div class="form-group ">
								<label for="sName" class="col-xs-3 control-label">用户名：</label>
								<div class="col-xs-8 ">
								<input type="text" class="form-control input-sm duiqi"
										id="ididid" placeholder="" name="ididid"  style="display: none;">
											<input type="text" class="form-control input-sm duiqi"
										id="phonephone" placeholder="" name="phonephone" style="display: none;">
									<input type="text" class="form-control input-sm duiqi"
										id="mydename" placeholder="" name="updateUsername">
								</div>
							</div>
						
							
			<div class="form-group">
				<label for="sKnot" class="col-xs-3 control-label">部门</label>
				<div class="col-xs-8">
					<select class="form-control input-sm duiqi" id="fofofofo" name="d"
						onchange="c()">
						<option value=0>请选择</option>
						<c:forEach var="value" items="${d}">
							<option value="${value.id} " >${value.departmentname}</option>
						</c:forEach>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label for="sKnot" class="col-xs-3 control-label">职位</label>
				<div class="col-xs-8">
					<select class="form-control input-sm duiqi" id="fofofofog"
						name="r" onchange="g()">
						<option value=0>请选择</option>
						<c:forEach var="value" items="${role}">
							<option value="${value.id} " >${value.rolename}</option>
						</c:forEach>
					</select>
				</div>
			</div>
						
							<div class="form-group">
								<label for="situation" class="col-xs-3 control-label">状态：</label>
								<div class="col-xs-8">
						<select class="form-control input-sm duiqi" id="GGTTYY" name="sely">
						<option value="0">未激活</option>
						<option value="1">激活</option>
						<option value="2">禁用</option>
						</select>
								</div>
							</div>
								<div class="modal-footer">
				<input type="button" class="btn btn-xs btn-white up"   value="修 改">
					<input type="button" class="btn btn-xs btn-white" data-dismiss="modal" value="取 消">
					<input type="button" class="btn btn-xs btn-green subb"  value="保 存">
				</div>
						</form>
					</div>
				</div>
		
			
	
			</div>
			
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->


<script type="text/javascript">
$(function(){
	
	var two="";

	$(".update-user").click(function(){
		
		
		
	two=$(this).parent("#go").parent("#GGGGGGG").attr("class");

	var s=two.substring(two.indexOf(" "));

    $.getJSON("selectThisUserInfoToInsert",{"userid":s},function(result){
    	
    	
    	
    	$("#mydename").val(result.name);
    	$("#fofofofo ").get(0).selectedIndex=result.departmentid;
    	$("#fofofofog ").get(0).selectedIndex=result.roleid;
    	$("#GGTTYY").get(0).selectedIndex=result.status;
        $("#ididid").val(result.id);
    	$("#phonephone").val(result.phone);
    	
    	$("#mydename").attr("disabled","disabled");
    	$("#fofofofo").attr("disabled","disabled");
    	$("#fofofofog").attr("disabled","disabled");
    	$("#GGTTYY").attr("disabled","disabled");
    	$(".subb").attr("disabled","disabled");
    	
    	
    		 

    	
    	
    });
	
	
	});

	
	$(".up").click(function(){
		$("#mydename").attr("disabled",false); 
    	$("#fofofofo").attr("disabled",false); 
    	$("#fofofofog").attr("disabled",false); 
    	$("#GGTTYY").attr("disabled",false); 
    	$(".subb").attr("disabled",false); 
		
	});


	$(".subb").click(function(){
		var mydename=$("#mydename").val();
    	var fofofofo= $("#fofofofo ").val();
    	var fofofofog= $("#fofofofog ").val();
    	var GGTTYY= $("#GGTTYY").val();
    	var ididid=  $("#ididid").val();
    	var phonephone= $("#phonephone").val();
    	var page= $("#page").val();
    	
    
    	
    	
    	window.location.href="IWantToUpdateThis?updateUsername="+mydename+"&phonephone="+phonephone+"&ididid="+ididid+"&d="+fofofofo+"&r="+fofofofog+"&sely="+GGTTYY+"&index="+page;
    
	});
	
	

});



</script>



	<!--弹出删除用户警告窗口-->
	<div class="modal fade" id="deleteUser" role="dialog"
		aria-labelledby="gridSystemModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="gridSystemModalLabel">提示</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid">确定要删除该用户？删除后不可恢复！</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-xs btn-white"
						data-dismiss="modal">取 消</button>
					<button type="button" class="btn  btn-xs btn-danger"  id="delUser">删 除</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->

</div>

<script type="text/javascript">
   $(function(){
	var phone="";
	   $(".deluserhaha").click(function(){
	
		phone=$(this).parent().parent().children(".phone").text();
	
			
	   });
		      
	
	   
	   
	   
	   
	   $("#delUser").click(function(){
		   
		   var page= $("#page").val();
		 
		  window.location.href="del?page="+page+"&HePhone="+phone;
   		 
   	
		   
		      
		   
	   });
	   
	   
   });
</script>


<!-- 职员管理模块 -->
<div role="tabpanel" class="tab-pane" id="sour">
	<div class="check-div form-inline">
		<button class="btn btn-yellow btn-xs" data-toggle="modal"
			data-target="#addSource" id="pos_adduser">添加职员</button>
		<button class="btn btn-yellow btn-xs" id="XSLS"
			>批量添加</button>
<c:if test="${shenfen==6}">
<form action="gotoLikeselecttoindexs" method="post">
		<span style="position:fixed;left:29%;top:5px;">校区</span><select class="form-control input-sm fowsiy4asdsadas" name="ca123qweasdmpus" style="position:fixed;left:31%;top:20px;">
		<option value=0  selected="selected" >全部</option>
			<c:forEach var="valuew" items="${mycampuslist}">
					<c:if test="${fourtousersqqwwaaass!=null}">
						<c:if test="${fourtousersqqwwaaass==valuew.id}">
							<option value=${valuew.id} selected="selected" >${valuew.campusname}</option>
						</c:if>
						<c:if test="${fourtousersqqwwaaass!=valuew.id}">
							<option value=${valuew.id}  >${valuew.campusname}</option>
						</c:if>
					</c:if>
						<c:if test="${fourtousersqqwwaaass==null}">
						<option value=${valuew.id}  >${valuew.campusname}</option>
						</c:if>
					
						</c:forEach>
		</select>

				<span style="position:fixed; top:4px;;left:49%;" >角色</span><select class="form-control input-sm col-xs-4 fowsiyt" id="ucantut10" name="fowsiyt"  style="position:fixed; top:21px;left:51%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="valuess" items="${tstomyposition}">
						<c:if test="${threetousers!=null}">
						<c:if test="${threetousers==valuess.id}">
							<option value=${valuess.id}  selected="selected">${valuess.positionname}</option>
						</c:if>
						<c:if test="${threetousers!=valuess.id}">
							<option value=${valuess.id}  >${valuess.positionname}</option>
						</c:if>
					</c:if>
						<c:if test="${threetousers==null}">
						<option value=${valuess.id}  >${valuess.positionname}</option>
						</c:if>
						</c:forEach>
					</select>
							<span  style="position:fixed; top:4px;;left:39%;"  >部门</span><select class="form-control input-sm fowsiyt1" id="ucantut9" name="fowsiyt1" style="position:fixed;top:20px;left:41%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="value" items="${d}">
					<c:if test="${twotousers!=null}">
						<c:if test="${twotousers==value.id}">
							<option value=${value.id}  selected="selected" >${value.departmentname}</option>
						</c:if>
						<c:if test="${twotousers!=value.id}">
							<option value=${value.id}  >${value.departmentname}</option>
						</c:if>
					</c:if>
						<c:if test="${twotousers==null}">
						<option value=${value.id} >${value.departmentname}</option>
						</c:if>
					
						</c:forEach>
					</select>
		<c:if test="${onetousers!=null}">
			<input style="position:fixed;left:59%;top: 20px; "  type="text" class="form-control input-sm fowsiytname"  name="fowsiytname"placeholder="输入名字搜索" value="${onetouser}">
		</c:if>
		<c:if test="${onetousers==null}">
			<input style="position:fixed;left:59%;top: 20px; " type="text" class="form-control input-sm fowsiytname"  name="fowsiytname"placeholder="输入名字搜索" value="">
		</c:if>
			<button class="btn btn-primary btn-sm  Iwilegofenyetofenye"   type="submit"  style="position:fixed;left:71%;top:19px;">查 询</button>

	</div>
	</form>
		</c:if>
		
		
	<c:if test="${shenfen!=6}">
	<form action="gotoLikeselecttoindexs" method="post">
				<span style="position:fixed; top:4px;;left:49%;" >角色</span><select class="form-control input-sm col-xs-4 fowsiyt" id="ucantut10" name="fowsiyt"  style="position:fixed; top:21px;left:51%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="valuess" items="${tstomyposition}">
						<c:if test="${threetousers!=null}">
						<c:if test="${threetousers==valuess.id}">
							<option value=${valuess.id}  selected="selected">${valuess.positionname}</option>
						</c:if>
						<c:if test="${threetousers!=valuess.id}">
							<option value=${valuess.id}  >${valuess.positionname}</option>
						</c:if>
					</c:if>
						<c:if test="${threetousers==null}">
						<option value=${valuess.id}  >${valuess.positionname}</option>
						</c:if>
						</c:forEach>
					</select>
						
						
			<c:if test="${shenfen!=3}">
							<span  style="position:fixed; top:4px;;left:39%;"  >部门</span><select class="form-control input-sm fowsiyt1" id="ucantut9" name="fowsiyt1" style="position:fixed;top:20px;left:41%;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="value" items="${d}">
					
					
					<c:if test="${twotousers!=null}">
						<c:if test="${twotousers==value.id}">
							<option value=${value.id}  selected="selected" >${value.departmentname}</option>
						</c:if>
						<c:if test="${twotousers!=value.id}">
							<option value=${value.id}  >${value.departmentname}</option>
						</c:if>
					</c:if>
						<c:if test="${twotousers==null}">
						<option value=${value.id} >${value.departmentname}</option>
						</c:if>
				
				
					
						</c:forEach>
					</select>
						</c:if>
	<c:if test="${shenfen==3}">
					<span  style="position:fixed; top:4px;;left:39%;"  >部门</span><select disabled="disabled" class="form-control input-sm fowsiyt1" id="ucantut9" name="fowsiyt1" style="position:fixed;top:20px;left:41%;color: #696969;">
						<option value=0  selected="selected">全部</option>
						<c:forEach var="value" items="${d}">
					
					
						<c:if test="${shenfenbumen==value.id}">
							<option value=${value.id} selected="selected" >${value.departmentname}</option>
						</c:if>
				
				
					
						</c:forEach>
					</select>
					</c:if>
	
		
		<c:if test="${onetousers!=null}">
			<input style="position:fixed;left:59%;top: 20px; "  type="text" class="form-control input-sm fowsiytname"  name="fowsiytname"placeholder="输入名字搜索" value="${onetouser}">
		</c:if>
		<c:if test="${onetousers==null}">
			<input style="position:fixed;left:59%;top: 20px; " type="text" class="form-control input-sm fowsiytname"  name="fowsiytname"placeholder="输入名字搜索" value="">
		</c:if>
			<button class="btn btn-primary btn-sm  Iwilegofenyetofenye"   type="submit"  style="position:fixed;left:71%;top:19px;">查 询</button>
	
	</div>
	</form>
		</c:if>
		
	

	
	<c:if test="${shenfen==6}">
	<div class="data-div">
		<div class="row tableHeader">
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">编码</div>
			<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">姓名</div>
			<div class="col-lg-2 col-md-2 col-sm-2 col-xs-1">校区</div>
			<div class="col-lg-2 col-md-2 col-sm-2 col-xs-1">电话</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">性别</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">职位</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">部门</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-2">操作</div>
		</div>
		<div class="tablebody">
			
				<c:forEach var="teacher" items="${teachers }">
				
				<div class="row">
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">${teacher.teachercode }</div>
				
					<div id="GGGRRR" class="col-lg-2 col-md-2 col-sm-2 col-xs-1"
						role="button" data-toggle="collapse" data-parent="#accordion"
						href="#collapseSystem" aria-expanded="true"
						aria-controls="collapseOne">
						<!-- <span id="topA" class="glyphicon  glyphicon-triangle-bottom  "></span> -->
						${teacher.teachername }
					</div>
				<div class="col-lg-2 col-md-2 col-sm-2 col-xs-1 "  id="isdefurtphone" >
						${teacher.campusname}
					</div>
					<div class="col-lg-2 col-md-2 col-sm-2 col-xs-1 ${teacher.phone}"  id="isdefurtphonesss" >
						${teacher.phone }
					</div>
				
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
						${teacher.sex }
					</div> 
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 GGEEWW" id="GGGRRRR">
						${teacher.positionname}
					</div>
				
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 GGEEWW2" id="GGGRRRRR">
						${teacher.departmentname}
					</div>
				
									
				
					<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
						<button class="btn btn-success btn-xs IwanttoaddOneTeacher" data-toggle="modal"
							data-target="#changeSource">修改</button>
						<button class="btn btn-danger btn-xs delteachertodel" data-toggle="modal"
							data-target="#deleteSource">删除</button>
					</div>	
				</div>	
				</c:forEach>
			
	
		</div>
	</div>
	</c:if>
	<c:if test="${shenfen!=6}">
	<div class="data-div">
		<div class="row tableHeader">
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">编码</div>
			<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">姓名</div>
	
			<div class="col-lg-2 col-md-2 col-sm-2 col-xs-1">电话</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">性别</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">职位</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">部门</div>
			<div class="col-lg-1 col-md-1 col-sm-1 col-xs-2">操作</div>
		</div>
		<div class="tablebody">
			
				<c:forEach var="teacher" items="${teachers }">
				
				<div class="row">
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 LLKKOOIIUU">${teacher.teachercode }</div>
				
					<div id="GGGRRR" class="col-lg-2 col-md-2 col-sm-2 col-xs-1"
						role="button" data-toggle="collapse" data-parent="#accordion"
						href="#collapseSystem" aria-expanded="true"
						aria-controls="collapseOne">
						<!-- <span id="topA" class="glyphicon  glyphicon-triangle-bottom  "></span> -->
						${teacher.teachername }
					</div>
			
					<div class="col-lg-2 col-md-2 col-sm-2 col-xs-1 ${teacher.phone}"  id="isdefurtphonesss" >
						${teacher.phone }
					</div>
				
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
						${teacher.sex }
					</div>
				
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1" id="GGGRRRR">
						${teacher.positionname}
					</div>
				
					<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 WEDS"  id="GGGRRRRR">
						${teacher.departmentname}
				
					</div>
				
									
				
					<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
						<button class="btn btn-success btn-xs IwanttoaddOneTeacher" data-toggle="modal"
							data-target="#changeSource">修改</button>
						<button class="btn btn-danger btn-xs delteachertodel" data-toggle="modal"
							data-target="#deleteSource">删除</button>
					</div>	
				</div>	
				</c:forEach>
			
	
		</div>
	</div>
	</c:if>
	

	<!--页码块-->
	<footer class="footer">
		<ul class="pagination">
			<li><select   id="selectpagess" >
			
		<c:forEach var="count"  items="${pageListGGGGGss}"   >
	       <c:if test="${indexpagesinfogos!=nul}">
	       <c:if test="${indexpagesinfogos==count }">
	        <option value="${count}"  selected="selected">${count}</option>
	       </c:if>
	       <c:if test="${indexpagesinfogos!=count }">
	        <option value="${count}"  >${count}</option>
	       </c:if>
	       </c:if>
					<c:if test="${indexpagesinfogos==nul}">
					    <option value="${count}"  >${count}</option>
					</c:if>
	
	</c:forEach>
			
			</select> 页</li>
			<li class="gray">共${userzonggongpagess}页</li>
			<li><i class="glyphicon glyphicon-menu-left" id="topss"> </i>
			</li>
			<li><i class="glyphicon glyphicon-menu-right" id="bottomss"> </i>
			</li>
		</ul>
	</footer>
	<script type="text/javascript">
$(function(){
	$("#selectpagess").change(function(){
		var index=$(this).val();
		window.location.href="goFenYe_getUsers?index="+index;
	});
	var cap=0;
	var page=0;
$("#topss").click(function(){
	
if($("#selectpagess").val()!=1){
	cap=$("#selectpagess").val();

	page=parseInt(cap)-1;
	window.location.href="goFenYe_getUsers?index="+page;
}else{
	cap=$("#selectpagess").val();
	page=cap;

	//window.location.href="goFenYe_getUsers?index="+page;
}
});
$("#bottomss").click(function(){
	if($("#selectpagess").val()=="${userzonggongpagess}"){
		cap=$("#selectpagess").val();
		page=cap;
		//window.location.href="goFenYe_getUsers?index="+page;
	}else{
		cap=$("#selectpagess").val();
		page=parseInt(cap)+1;
		window.location.href="goFenYe_getUsers?index="+page;	
	}
	});
});

</script>
	<!--弹出窗口 添加资源-->
	<div class="modal fade" id="addSource" role="dialog"
		aria-labelledby="gridSystemModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="gridSystemModalLabel">添加职员</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid">
						<form class="form-horizontal" id="teachers-form"  action="firetoaddTeachersYes" method="post">
							<div class="form-group ">
								<label for="sName" class="col-xs-3 control-label">名称：</label>
								<div class="col-xs-8 ">
									<input type="email" class="form-control input-sm duiqi tjzydname"
										id="sName" placeholder="必填" name="name">
								</div>
							</div>
							<div class="form-group">
								<label for="sOrd" class="col-xs-3 control-label">性别：</label>
								<div class="col-xs-8">
									<input type="" class="form-control input-sm duiqi tjyhdxb" id="sOrd"
										placeholder="必填" name="sex">
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">电话：</label>
								<div class="col-xs-8">
									<input type="" class="form-control input-sm duiqi tjyhphone" id="sKnot"
										placeholder="必填" name="phone">
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">入职时间：</label>
								<div class="col-xs-8">
									<input type="date" class="form-control input-sm duiqi tjyhdrzsj" id="sKnot"
										placeholder="" name="date">
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">介绍：</label>
								<div class="col-xs-8">
									<input type="" class="form-control input-sm duiqi tjyhdinfo" id="sKnot"
										placeholder="" name="info">
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">职位：</label>
								<div class="col-xs-8">
									
									
					<select  class="form-control input-sm duiqi"  id="pos_position"  	placeholder="请选择"  name="pos_position" >
						
						<c:forEach var="valuess" items="${tstomyposition}">
					
				
					
							<option value=${valuess.id}  >${valuess.positionname}</option>
				
						</c:forEach>
					</select>
					
								</div>
							</div>
						
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">部门：</label>
								<div class="col-xs-8">
								<c:if test="${shenfen==3}">
									
									<select disabled="disabled"  class="form-control input-sm duiqi" id="pos_department"
										placeholder="" name="pos_department" style="color: #696969;">
											<c:forEach var="value" items="${d}">
					     <c:if test="${shenfenbumen==value.id}">
					     	<option value="${value.id} " >${value.departmentname}</option>
						 </c:if>
						                </c:forEach>
									</select>
								
								</c:if>
									<c:if test="${shenfen!=3}">
									<select   class="form-control input-sm duiqi" id="pos_department"
										placeholder="" name="pos_department">
											<c:forEach var="value" items="${d}">
					     
					     	<option value="${value.id} " >${value.departmentname}</option>
						 
						                </c:forEach>
									</select>
									</c:if>
								</div>
							</div>
							
							
						</form>
					</div>
				</div>

				<div class="modal-footer">
					<button type="button" class="btn btn-xs btn-xs btn-white"
						data-dismiss="modal">取 消</button>
					<button type="button" class="btn btn-xs btn-xs btn-green gotobaocunteachers" id="teacher-submit">保
						存</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->

<script type="text/javascript">

$(function(){

	
	
var count=0;
var count1=0;
var count2=0;
var count3=0;
var one=false;
var two=false;
var three=false;
	$(".tjzydname").blur(function(){
		if($(this).val()==""){
		if(count==0){
			$(this).after("<span class='tjzydname_ts'>名字不能为空</span>");
		count=1;
		one=false;
		}
		}
		
		if($(this).val()!=""){
			$(".tjzydname_ts").remove();
			count=0;
			one=true;
		}
		
		
	
				
		
	});
	
	
	
	$(".tjyhdxb").blur(function(){

		if($(this).val()!="男" || $(this).val()!="女"){
		if(count1==0){
			$(this).after("<span class='tjyhdxb_ts'>性别错误</span>");
			count1=1;
			two=false;
		}
		}
		
		if($(this).val()=="男" || $(this).val()=="女" ){
			$(".tjyhdxb_ts").remove();
			count1=0;
			two=true;
		}
		
	});
	
	$(".tjyhphone").blur(function(){
		  if ((/^1[34578]\d{9}$/).test($(this).val())){
			  $(".tjyhphone_ts").remove();
				count2=0;
		  three =true ;
		    $.getJSON("pdzgtsfcz",{"phone":$(this).val()},function(result){
		    	
		    	if(result>=1){
		    	if(count3==0){	
		    	
		    		 alert("用户已经存在");
		    		  count3==1;
		    		  three=false;
		    	}
		    	
		    	}
		    	if(result==0){
		    	
		    		 count3==0;
		    		  three=true;
		    	}
		    });  
		  }else {
			  if(count2==0){
				  $(this).after("<span class='tjyhphone_ts'>电话格式错误</span>");
				  count2=1;
				  three = false;
				}
		   
		  }
		});
	
	$("#teacher-submit").click(function(){
		if(one && two && three==true){
	
			$("#teachers-form").submit();
			
		}else{
			alert("请完善信息");
		}
		
		
	});
	
});
</script>
	<!--修改资源弹出窗口-->
	<div class="modal fade" id="changeSource" role="dialog"
		aria-labelledby="gridSystemModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="gridSystemModalLabel">修改职员信息</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid">
						<form class="form-horizontal" id="updateteacher" action="updateteachertomysqloo" method="post">
							<div class="form-group ">
								<label for="sName" class="col-xs-3 control-label">名称：</label>
								<div class="col-xs-8 ">
									<input type="email" class="form-control input-sm duiqi"
										id="teacherNametoset" placeholder="" name="teachername">
										<input type="email" class="form-control input-sm duiqi"
										id="teacherNametosetphone" placeholder="" style="display: none;" name="phone">
										<input type="email" class="form-control input-sm duiqi"
										id="teacherNametosetphonetopage" placeholder="" style="display: none;" name="page">
								</div>
							</div>
						
								<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">职位：</label>
								<div class="col-xs-8">
									<select  class="form-control input-sm duiqi setteacherposition" id="pos_position"
										placeholder="" name="pos_position" >
		
									</select>	
								</div>
							</div>
							<div class="form-group">
								<label for="sKnot" class="col-xs-3 control-label">部门：</label>
								<div class="col-xs-8">
									<select  class="form-control input-sm duiqi setteacherdepartmentidsu" id="pos_departments"
										placeholder="" name="pos_departments" >
										<c:forEach var="value" items="${d}">
					     
					     	            <option value=${value.id} >${value.departmentname}</option>
						 
						                </c:forEach>
									</select>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-xs btn-white"
						data-dismiss="modal">取 消</button>
					<button type="button" class="btn btn-xs btn-green" id="updateteacher-submit">保 存</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
	
	
	
	
	<!--弹出删除资源警告窗口-->
	<div class="modal fade" id="deleteSource" role="dialog"
		aria-labelledby="gridSystemModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="gridSystemModalLabel">提示</h4>
				</div>
				<div class="modal-body">
					<div class="container-fluid">确定要删除该资源？删除后不可恢复！</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-xs btn-white"
						data-dismiss="modal">取 消</button>
					<button type="button" class="btn btn-xs btn-danger Iwangtosetteachettoisdel">删 除</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
</div>


<script type="text/javascript">

$(function(){
	var phone="";
	var page="";
	$(".delteachertodel").click(function(){
	
		phone=$(this).parent().parent().children("#isdefurtphonesss").text().trim();
		alert(phone);
		page=$("#selectpagess").val();

	});
	$(".Iwangtosetteachettoisdel").click(function(){
		
		window.location.href="dels?page="+page+"&HePhone="+phone;
		
	});
	
	
	
	
	
	$("#updateteacher-submit").click(function(){
		$("#updateteacher").submit();
		
	});
	
});

</script>


<!-- 个人中心模块 -->
<div role="tabpanel" class="tab-pane" id="chan">

	<div style="padding: 50px 0;margin-top: 50px;background-color: #fff; text-align: right;width: 1000px; height:700px;margin: 50px auto;">
			<img class="headimg" id="head-img" src="${user.headimg}"
				style="border: 1px solid ; width: 100px;height: 100px; position:relative;margin-top:-10%;left: -39%; ">
			<button class="btn btn-yellow btn-xs" id="setimg" data-toggle="modal"
				data-target=""
				style="width: 90px;height: 30px; position:relative; margin-top:10%; left:-49%;  right:0px; bottom: 0px; ">修改头像</button>
			
			
			
		<form class="form-horizontal" id="IwantToshenyexiedaima" action="ShenyeXieDaiMaLei" method="post"
			style=" position:relative;  top: 10%; left:-20%;  right: 0px; bottom: 0px;  margin: auto">

			<div style="position: relative;margin-top:-7%; ">
			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">姓名：</label>
				<div class="col-xs-5">
					<input type="" class="form-control input-sm duiqi youmustsendyouname" id="sKnot1"
						placeholder="${user.name}"   style="margin-top: 7px;width: 100px;" name="setname">
				</div>
			</div>
			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">电话：</label>
				<div class="col-xs-5">
					<input type="" class="form-control input-sm duiqi " id="sKnot2"
						placeholder="${user.phone}" style="margin-top: 7px;" name="setphone">
				</div>
			</div>
			<div class="form-group"  id="headtitr" >
				<label for="sKnot" class="col-xs-4 control-label">请输入密码：</label>
				<div class="col-xs-5">
					<input type="" class="form-control input-sm duiqi pleasesendyoupwd" id="sKnot2"
						placeholder="" style="margin-top: 7px;">
				</div>
			</div>
			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">简介：</label>
				<div class="col-xs-5">
					<textarea class="form-control input-sm duiqi myinfotoset" id="sKnot3" rows="8"
						cols="40" name="setinfo">${user.info}</textarea>
				</div>
			</div>
			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">部门</label>
				<div class="col-xs-5">
					<select disabled="disabled" class="form-control input-sm duiqi" id="ucantut" name="sel"
						onchange="c()" style="color: #696969;">
						<option value=0>请选择</option>
						<c:forEach var="value" items="${d}">
							<option value=${value.id} selected="selected" >${value.departmentname}</option>
						</c:forEach>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">职位</label>
				<div class="col-xs-1">
					<select disabled="disabled" style="color: #696969;" class="form-control input-sm duiqi" id="ucantut1"
						name="selt" onchange="g()">
						<option value=0>请选择</option>
						<c:forEach var="value" items="${r}">
							<option value=${value.id}  selected="selected">${
								value.positionname}</option>
						</c:forEach>
					</select>
				</div>
			</div>

			<div class="form-group text-right" style="margin-left: 200px;">
				<div class="col-xs-offset-4 col-xs-5" style="margin-left: 200px;">
					<input type="button" class="btn btn-xs btn-white wowangto" id="" 
						onclick="resut()" value="取消"> <input type="submit"
						class="btn btn-xs btn-green" id="sub" value="保存">
				</div>
			</div>
			</div>
		</form>

	<form class="form-horizontal "  id="Iwanttosetmyinifo" action="xingqiliuxiedexiugaipwd" method="post"
			style=" position:absolute ;  top: 30%; left:40%;  right: 0px; bottom: 0px;  margin: auto">

			<div style="position: relative;margin-top:-7%; ">
			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">原密码：</label>
				<div class="col-xs-5">
					<input type="" class="form-control input-sm duiqi yuanpassword" id="sKnot1"
						placeholder="" style="margin-top: 7px;width: 100px;">
				</div>
			</div>
			<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">新密码：</label>
				<div class="col-xs-5">
					<input type="password" class="form-control input-sm duiqi xinpassword" id="sKnot1"
						placeholder="" style="margin-top: 7px;">
				</div>
			</div>
				<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">再次确认新密码：</label>
				<div class="col-xs-5">
					<input type="password" class="form-control input-sm duiqi xinpassword2" id="sKnot1"
						placeholder="" style="margin-top: 7px;" name="pwd">
				</div>
			</div>
				<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">邮箱：</label>
				<div class="col-xs-5">
					<input type="text" class="form-control input-sm duiqi emailMy" id="sKnot1"
						placeholder="${user.email}" style="margin-top: 7px;" name="email">
				</div>
			</div>
		<div class="form-group">
				<label for="sKnot" class="col-xs-4 control-label">邮箱提醒方式：</label>
				<div class="col-xs-5">
				<c:if test="${user.emailRemind==0}">
					<input type="radio" class="  duiqi " id="sKnot1"
					 name="emailemail" value="0" checked><span  style="position: relative;top: -20px;" >线上提醒</span>
					 <input type="radio" class=" duiqi " id="sKnot1"
					 name="emailemail" value="1"><span  style="position: relative;top: -20px;">线下提醒</span>
					  <input type="radio" class="  duiqi " id="sKnot1"
					  name="emailemail" value="2"><span style="position: relative;top: -20px;">不提醒</span>
					 </c:if>
					
					 	<c:if test="${user.emailRemind==1}">
					<input type="radio" class="  duiqi " id="sKnot1"
					 name="emailemail" value="0"><span  style="position: relative;top: -20px;" >线上提醒</span>
					 <input type="radio" class=" duiqi " id="sKnot1"
					 name="emailemail" value="1" checked><span  style="position: relative;top: -20px;" >线下提醒</span>
					  <input type="radio" class="  duiqi " id="sKnot1"
					  name="emailemail" value="2"><span style="position: relative;top: -20px;">不提醒</span>
					 </c:if>
				
					 	<c:if test="${user.emailRemind==2}">
					<input type="radio" class="  duiqi " id="sKnot1"
					 name="emailemail" value="0"><span  style="position: relative;top: -20px;" >线上提醒</span>
					 <input type="radio" class=" duiqi " id="sKnot1"
					 name="emailemail" value="1"><span  style="position: relative;top: -20px;">线下提醒</span>
					  <input type="radio" class="  duiqi " id="sKnot1"
					  name="emailemail" value="2" checked><span style="position: relative;top: -20px;" >不提醒</span>
					 </c:if>
				</div>
			</div>
			<div class="form-group text-right" style="margin-left: 100px;">
				<div class="col-xs-offset-4 col-xs-5" style="margin-left: 100px;">
					<input type="reset" class="btn btn-xs btn-white whattejintian" id="rest"
						onclick="resut()" value="取消"> <input type="submit"
						class="btn btn-xs btn-green xiugaiyonghuinfobuttonhaha" id="sub" value="修 改">
				</div>
			</div>
			</div>
		</form>
	
	</div>

</div>




<script type="text/javascript">
$(function(){
	
	$(".whattejintian").click(function(){
		
		  $(".xinpassword").attr("disabled",true); 
			$(".xinpassword2").attr("disabled",true); 
		
	});
	
	
	$(".wowangto").click(function(){
	
		      $(".youmustsendyouname").val("");         
		      $(".sKnot2").val("");
		      $("#headtitr").hide();
		      $("#sKnot2").attr("disabled",false);
		      $(".myinfotoset").val("${user.info}");
		      $(".ifyter").remove();
		      $("#sub").attr("value","修改");
		   
		      
		      
	});
	
	$(".xinpassword").attr("disabled",true); 
	$(".xinpassword2").attr("disabled",true); 
	var yuanpwd=false;
	var xinpwd=false;
	var xinpwd2=false;
	var emaile_Boolean=false;


	
	var count=0;
	var count2=0;
	var count1=0;
	var count3=0;
	var count4=0;
	$(".yuanpassword").blur(function(){
		
		
if($(this).val()==""){
			
	$(".wbsms").remove();
	    count=0;
	    yuanpwd=true;
	    $(".xinpassword").attr("disabled",true); 
		$(".xinpassword2").attr("disabled",true); 
			
		}else if($(this).val()!="${user.password}"){
			if(count==0){
			$(this).after("<span class='wbsms' style='color='red'; '>与原密码不匹配</span>");
	    count=1;
	    yuanpwd=false;
	    
		} 
		
		
		}
		
		
		
		 if($(this).val()=="${user.password}"){
			 $(".xinpassword").attr("disabled",false); 
			 $(".xinpassword2").attr("disabled",false); 
			 yuanpwd=true;
				$(".wbsms").remove();
				count=0;
			}
	});

	
	$(".xinpassword").blur(function(){
		
		if($(this).val()==$(".yuanpassword").val()){
			if(count1==0){
			$(this).after("<span class='GG' style='color='red'; '>与原密码一致请重新输入</span>");
	    count1=1;
	    xinpwd=false;
	    
		} 
		
		
		}
		 if($(this).val()!=$(".yuanpassword").val()){
			
			 if($(this).val()==""){
				 xinpwd=false;
					$(".GG").remove();
					count1=0;
			 }else{
			 
			 xinpwd=true;
				$(".GG").remove();
				count1=0;
			}}
	});

	$(".emailMy").blur(function(){	 
				 
		if($(this).val()==""){
			count3=0;
			
			$(".GGGRR").remove();
			    emaile_Boolean = true;
			
		}else if ((/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/).test($(".emailMy").val())){
					count3=0;
				
					$(".GGGRR").remove();
					    emaile_Boolean = true;
				  }else {
					  
					  if(count3==0){
					  $(this).after("<span class='GGGRR' style='color='red'; '>邮箱格式错误</span>");
					    emaile_Boolean = false;
					    count3=1;
					  }
				    
				  }	
		 
		 
		 
		 
	
	
	});
	$(".xinpassword2").blur(function(){
		
		if($(this).val()!=$(".xinpassword").val()){
			 xinpwd2=false;
			if(count==0){
			$(this).after("<span class='wbsms2' style='color='red'; '>两次新密码不匹配</span>");
	    count4=1;
	    xinpwd2=false;
	    
		} 
		
		
		}
		 if($(this).val()==$(".xinpassword").val()){
			 $(".xinpassword").attr("disabled",false); 
			 $(".xinpassword2").attr("disabled",false); 
			  xinpwd2=true;
				$(".wbsms2").remove();
				count4=0;
			}
	});

	var emailboolenasd=false;
	$("input[name=emailemail]").change(function(){
		emailboolenasd=true;
		
	});
	
	
	
	$("#Iwanttosetmyinifo").submit(function(){



	if( yuanpwd  &&   xinpwd && xinpwd2 ==true && emaile_Boolean==false ){
		return true;
	}else if( yuanpwd==false  &&   xinpwd==false   && xinpwd2 ==false && emaile_Boolean==true ){
		
		return true;
		
	}else if(yuanpwd  &&   xinpwd  && xinpwd2 ==true && emaile_Boolean==true){
		return true;
	}else  if( yuanpwd  &&   xinpwd  && xinpwd2 ==false && emaile_Boolean==false ){
		
		alert("请正确修改个人信息");
		return false;
	}else if(emailboolenasd==true){
		return true;
		
	}else{
		alert("请正确修改个人信息");
		return false;
		
	}
		
		
	});
	
	
	
	
	$(function() {
		var phone="";
		var department="";
		var position="";
		var name="";
var page="";
		   
		//获取职位信息
		$.ajax({
			type : "Post",
			url : "${pageContext.request.contextPath }/getPositionList",
			dataType : "json",
			success : function(data) {
				var htmlStr="";
				for (var i = 0; i < data.length; i++) {
					htmlStr+="<option value="+data[i].id+">"+data[i].positionname+"</option>";
				}
				$(".setteacherposition").html(htmlStr);
				
				 
				
				
			},
			error : function(request) {
				alert(request.status);
			}
		
		
		});
		//获取部门信息
		$.ajax({
			type : "Post",
			url : "${pageContext.request.contextPath }/getDepartmentList",
			dataType : "json",
			success : function(data) {
				var htmlStr="";
				for (var i = 0; i < data.length; i++) {
					if('${shenfenbumen==data[i].id}'){
			
						htmlStr+="<option value=\""+data[i].id+"\">"+data[i].departmentname+"</option>"
					
					}else{
						htmlStr+="<option value=\""+data[i].id+"\">"+data[i].departmentname+"</option>"
					}
					
				
			
				
				}
				$("select[name='pos_departmenttt']").html(htmlStr);
			},
			error : function(request) {
				alert(request.status);
			}
	
		
		});
		$(".IwanttoaddOneTeacher").click(function() {
	  
			
			
			 name=$(this).parent().parent().children("#GGGRRR").text();
			   department=$(this).parent().parent().children("#GGGRRRR").text();
			   position=$(this).parent().parent().children("#GGGRRRRR").text();
			
			   phone=$(this).parent().parent().children("#isdefurtphonesss").text().trim();
		
			
			page=$("#selectpagess").val();
			
			   $("#teacherNametoset").val(name);
				  //alert( $(".setteacherposition").val());
				    $("#teacherNametosetphone").val(phone);
				    
				    $("#teacherNametosetphonetopage").val(page);
			   $.getJSON("GoWantYITQWS",{"phone":phone},function(result){
				 
				   
				   $(".setteacherposition").val(result.positionid);
				   $(".setteacherdepartmentidsu").val(result.departmentid);
				   
					  //$(".setteacherposition").get(0).selectedIndex= ;
				
				   });
				
		   
			  
			   
			   
			   
			   
		});

	});

});
</script>


<script type="text/javascript">
	$(function() {
		var what=false;
		var phonebool=false;
		var count=0;
		var count1=0;
		var namebool=false;
		$("#headtitr").hide();
		$("#sKnot2").focus(function(){
			
			$(this).after("<span class='wcjs' style='color='red'; '>此次更改会更改登录账号</span>");
		if(what==false){
			$("#headtitr").show();
		$(this).attr("disabled",true);
		}
		});
		
		$(".pleasesendyoupwd").blur(function(){
			if($(this).val()=="${user.password}"){
				what=true;
				$("#headtitr").hide();
				$("#sKnot2").attr("disabled",false);
			}else{
				alert("密码错误");
			}
			
		});
		
		$(".youmustsendyouname").blur(function(){
			
			if($(this).val()==""){
				if(count1==0){
				$(this).after("<span class='ifyter'>修改姓名不能不能为空</span>");
				count1=1;
				namebool=false;
				}
			}else{
				$(".ifyter").remove();
				count1=0;
				namebool=true;
			}
			
			
			
		});
		
		
		$("#sKnot2").blur(function(){
			
			$(".wcjs").remove();
			
		
				  if ((/^1[34578]\d{9}$/).test($("#sKnot2").val())){
		
					  
					  $(".wwccjs").remove();
					 count=0;
					  phonebool=true;
				  }else {
					  if(count==0){
					if($(this).val()!=""){
						  $(this).after("<span class='wwccjs' style='color='red'; '>电话格式不正确</span>");   
					  count=1;
					  phonebool=false;
					}  
					}
				  }
		
			
			
			
			
		});
		var caonima=false;
	    $(".myinfotoset").blur(function(){
	    	
	    	if($(this).val()=='${user.info}'){
	    		
	    		caonima=false;
	    	}else{
	    		caonima=true;
	    	}
	    	
	    	
	    });
		$("#IwantToshenyexiedaima").submit(function(){
		
      
			if(phonebool && namebool==true){
				
				return true;
			}else if(phonebool==false && namebool==true){
				return true;
			}else if(phonebool==true && namebool==false){
				return true;
			}else if(caonima==true){
				return true;
			}else {
				alert("请正确填改信息");
				return false;
			}
			
			
		});
		
		
		
		
		var i = document.getElementById("ucantut");
		i.selectedIndex = "${my.ds.id}";

		var c = document.getElementById("ucantut1");
		c.selectedIndex = "${my.p.id}";

	});
var bool=true;
var bool1=true;
	function c() {
		var select = document.getElementById("ucantut");

		var lastIndex = select.selectedIndex;

		var midValue = "${my.ds.id}";
		//var text = select.options[index].text;
		if (midValue != lastIndex) {
			alert("更改部门须请求上级");
			document.getElementById("sub").setAttribute("value", "发送请求");
bool=false;
		} else {
			bool=true;
			if(bool1==true){
			document.getElementById("sub").setAttribute("value", "保 存");
			}
		}
	}
	$(function() {
		$("#pos_adduser").click(function() {
			//获取职位信息
			$.ajax({
				type : "Post",
				url : "${pageContext.request.contextPath }/getPositionList",
				dataType : "json",
				success : function(data) {
					var htmlStr="";
					for (var i = 0; i < data.length; i++) {
						htmlStr+="<option value=\""+data[i].id+"\">"+data[i].positionname+"</option>";
					}
					$("select[name='pos_position']").html(htmlStr);
				},
				error : function(request) {
					alert(request.status);
				}
			});
			//获取部门信息
			$.ajax({
				type : "Post",
				url : "${pageContext.request.contextPath }/getDepartmentList",
				dataType : "json",
				success : function(data) {
					var htmlStr="";
					for (var i = 0; i < data.length; i++) {
				
						if('${shenfenbumen==data[i].id}'){
						htmlStr+="<option value="+data[i].id+"  selected = 'selected'>"+data[i].departmentname+"</option>";
			
					}else{
						htmlStr+="<option value="+data[i].id+">"+data[i].departmentname+"</option>";
					}
					
					}
					$("select[name='pos_department']").html(htmlStr);
				},
				error : function(request) {
					alert(request.status);
				}
			});
			//获取校区信息
			$.ajax({
				type : "Post",
				url : "${pageContext.request.contextPath }/getCampusList",
				dataType : "json",
				success : function(data) {
					var htmlStr="";
					for (var i = 0; i < data.length; i++) {
						htmlStr+="<option value=\""+data[i].id+"\">"+data[i].campusname+"</option>"
					}
					$("select[name='pos_campus']").html(htmlStr);
				},
				error : function(request) {
					alert(request.status);
				}
			});
		});
	});

	
	function g() {
		var select = document.getElementById("ucantut1");

		var lastIndex = select.selectedIndex;

		var midValue = "${my.p.id}";
		//var text = select.options[index].text;
		if (midValue != lastIndex) {
			alert("更改职位须请求上级");
			document.getElementById("sub").setAttribute("value", "发送请求");
			bool1=false;
		} else {
			bool1=true;
			if(bool==true){
			document.getElementById("sub").setAttribute("value", "保 存");
			}
		}
	}
</script>
<script type="text/javascript">
	function resut() {

		var i = document.getElementById("ucantut");
		i.selectedIndex = "${my.ds.id}";

		var c = document.getElementById("ucantut1");
		c.selectedIndex = "${my.p.id}";

		var g = document.getElementById("sKnot3");
		g.value = "${user.info}";

		var q = document.getElementById("sKnot2");
		q.value = "";

		var z = document.getElementById("sKnot1");
		z.value = "";

	}
</script>	
	<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/plupload.full.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/upFile.js"></script>
